import 'package:built_collection/built_collection.dart';
import 'package:equatable/equatable.dart';

sealed class AssetCollectionListItem {
  String get id;

  BuiltMap<String, String> get titles;
}

class AssetCollection extends Equatable implements AssetCollectionListItem {
  const AssetCollection({
    required this.id,
    required this.titles,
    required this.lexicalItemIds,
  });

  @override
  final String id;

  @override
  final BuiltMap<String, String> titles;

  final BuiltSet<String> lexicalItemIds;

  @override
  List<Object?> get props {
    return [
      id,
      titles,
      lexicalItemIds,
    ];
  }
}

class AssetCollectionFolder extends Equatable implements AssetCollectionListItem {
  const AssetCollectionFolder({
    required this.id,
    required this.titles,
    required this.collections,
  });

  @override
  final String id;

  @override
  final BuiltMap<String, String> titles;

  final BuiltList<AssetCollection> collections;

  @override
  List<Object?> get props {
    return [
      id,
      titles,
      collections,
    ];
  }
}
